﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TVXD23.Web.Models.ViewModel.DepartmentsModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	index
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<link href="../../Content/css/HRMCss.css" rel="stylesheet" type="text/css" />
    <h2>Danh sách phòng</h2>

    <table border="0" width="100%" cellpadding="0"  cellspacing="0" style="margin:5px;">
        <tr>
            <th width="20%">
                Mã phòng
            </th>
            <th width="50%">
                Tên phòng
            </th>
            <th width="30%">
                Chức Năng
            </th>      
        </tr>

    <% foreach (var item in Model.listDepartment) { %>
        <% if(item != null) {%>
            <tr >            
                <td style="text-align:center;">
                    <%: item.departmentId %>
                </td>
                <td>
                   <p>
                        <a href="/HRM/DetailsDepart/<%:item.departmentId %>">  <%: item.Name %></a>
                   </p>
                </td>
                      
                <td>
                    <%: Html.ActionLink("Danh sách nhân viên", "ListEmp", new { id = item.departmentId })%>  &nbsp;&nbsp;&nbsp;|
                    <%: Html.ActionLink("Xóa", "DeleteDepart", new { id = item.departmentId })%>

                </td>
            </tr>
        <% } %>
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Tạo mới", "CreateDepart") %>
    </p>

</asp:Content>

